# 登录优化案例
login_data = [
{"username": "13488888888", "password": "123456"},
{"username": "", "password": "123456"},
{"username": "13800000001", "password": ""},
{"username": "13800000001", "password": "123"}
]
def login(phone,pwd):
    """
    登录判断函数
    :param phone: 手机号
    :param pwd: 密码
    :return: 无
    """
    if phone=="13488888888" and pwd=="123456":
        print("登录成功")
    else:
        print("登录失败")
# 调用函数
# login("","123456")
# login("13488888888","123456")
num=1
for i in  login_data:
    phone=i.get("username")
    pwd=i.get("password")
    print(f"第{num}次测试")
    login(phone,pwd)
    num+=1